package com.dys.vo;

import com.dys.util.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @className: com.dys.vo.AirExceptionHandler
 * @description: 异常处理
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/04/10 19:45
 */
@RestControllerAdvice
public class AirExceptionHandler {

    @ExceptionHandler(Exception.class)
    public ResultVO ex(Exception ex) {
        return R.error(-1, ex.getMessage());
    }

}
